-
Notifications
You must be signed in to change notification settings - Fork 465
fix: update slasher field immediately when instantEffectBlock=true #1687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ypatil12
merged 1 commit into
feat/slashing-improvements-audit-fixes
from
fix/L01-slasher-storage
Jan 8, 2026
Merged
fix: update slasher field immediately when instantEffectBlock=true #1687
ypatil12
merged 1 commit into
feat/slashing-improvements-audit-fixes
from
fix/L01-slasher-storage
Jan 8, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Addresses audit finding L-01: Instant slasher setting leaves stale slasher field in storage. When a slasher is set with immediate effect (via createOperatorSets or migrateSlashers), _updateSlasher now also updates the params.slasher field, not just pendingSlasher. This ensures storage consistency where the raw SlasherParams struct reflects the effective slasher immediately. Changes: - AllocationManager._updateSlasher(): Set params.slasher when instantEffectBlock=true - IAllocationManager: Updated NatSpec for SlasherParams struct - AllocationManagerHarness: Added getSlasherParams() for testing raw storage - Unit tests: Added tests verifying storage consistency - Docs: Updated createOperatorSets and migrateSlashers effects 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
cbb859e to
e4bf888
Compare
0xClandestine
approved these changes
Jan 6, 2026
Member
0xClandestine
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
e9bb4b0
into
feat/slashing-improvements-audit-fixes
9 checks passed
ypatil12
added a commit
that referenced
this pull request
Jan 8, 2026
…1687) **Motivation:** Address L-01 finding from the Certora audit: "Instant slasher setting leaves stale slasher field in storage". When `_updateSlasher()` is called with `instantEffectBlock=true`, only `pendingSlasher` and `effectBlock` are updated, leaving the `slasher` field stale (address(0) for new operator sets). While `getSlasher()` returns correct values, raw storage is inconsistent. **Modifications:** - Updated `_updateSlasher()` in `AllocationManager.sol` to set `params.slasher = slasher` when `instantEffectBlock=true` - Updated NatSpec for `SlasherParams` struct in `IAllocationManager.sol` to document storage behavior - Added `getSlasherParams()` helper to `AllocationManagerHarness.sol` for testing raw storage - Added unit tests for instant slasher storage consistency - Updated documentation in `docs/core/AllocationManager.md` **Result:** - Storage is now consistent when creating operator sets or migrating slashers - Both `slasher` and `pendingSlasher` fields are set immediately when `instantEffectBlock=true` - Raw storage reads will return expected values matching `getSlasher()` return value 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
ypatil12
added a commit
that referenced
this pull request
Jan 13, 2026
**Motivation:** Address findings from the Certora audit of EigenLayer Slashing UX Improvements. This branch consolidates fixes for low-severity findings (L-01) and informational findings (I-01 through I-05) across AllocationManager and ProtocolRegistry contracts. **Modifications:** ### AllocationManager Fixes **L-01: State inconsistency fixes** - Update `slasher` field immediately when `instantEffectBlock=true` to prevent stale storage (#1687) - Update `delay` and `isSet` fields immediately for newly registered operators to ensure storage consistency (#1688) **I-01: Re-proposing same pending slasher is now a no-op** (#1689) - Added check in `_updateSlasher()` to skip processing if the proposed slasher is already pending - Prevents accidentally restarting the delay countdown **I-02: Add NatSpec documentation for getSlasher/getPendingSlasher** (#1689) - Document that these functions return `address(0)`/`0` for non-existent operator sets **I-03: Add separate SLASHER_CONFIGURATION_DELAY constant** (#1689) - New immutable allows independent configuration of slasher delay in future upgrades - Currently set to same value as `ALLOCATION_CONFIGURATION_DELAY` **I-05: Add gas warning documentation for migrateSlashers** (#1689) - Document O(appointees) gas cost per operator set - Warn about potential block gas limit issues with large appointee sets ### ProtocolRegistry Fixes **I-01: ship() lacks validation** (#1690) - Added array length validation for addresses, configs, and names - Added zero address validation with new `ArrayLengthMismatch()` and `InputAddressZero()` errors **I-02: Orphaned configs on name overwrite** (#1690) - Delete old address's `DeploymentConfig` when re-shipping a name with a new address - Added `DeploymentConfigDeleted(address)` event **I-03: configure() for unshipped addresses** (#1690) - Updated `configure` to require a name parameter - Added validation that address must be a shipped deployment **I-04: Fix misleading NatSpec** (#1690) - Clarified `ship()` behavior when re-shipping names - Updated `configure()` NatSpec for address requirements **I-05: Document pauseAll blocking** (#1690) - Added warning that `pauseAll()` reverts if ANY pausable deployment fails ### Other Changes - v1.9.0 upgrade script fixes for testnet deploy (#1677) - Added Claude skills for development workflow (#1686) **Result:** - Audit fixes complete
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation:
Address L-01 finding from the Certora audit: "Instant slasher setting leaves stale slasher field in storage". When
_updateSlasher()is called withinstantEffectBlock=true, onlypendingSlasherandeffectBlockare updated, leaving theslasherfield stale (address(0) for new operator sets). WhilegetSlasher()returns correct values, raw storage is inconsistent.Modifications:
_updateSlasher()inAllocationManager.solto setparams.slasher = slasherwheninstantEffectBlock=trueSlasherParamsstruct inIAllocationManager.solto document storage behaviorgetSlasherParams()helper toAllocationManagerHarness.solfor testing raw storagedocs/core/AllocationManager.mdResult:
slasherandpendingSlasherfields are set immediately wheninstantEffectBlock=truegetSlasher()return value🤖 Generated with Claude Code